clear

**APPENDIX A: supplemental figures and tables

*********************************************************
* Figure A.1: Frequency of divided governments over time
*********************************************************
use "$data\final.dta"

* drop observations where party affiliation of mayor is unclear
drop if mayor_party==""

* generate divided government indicator
gen divided=((left_mayor==1&spd_green_majority==0) |(right_mayor==1 & cdu_fdp_majority==0)|(independent_mayor==1&  independent_majority==0)  )
bysort year: egen divided_sum=sum(divided)
bysort year: egen sum_obs=count(code)
gen divided_share=(divided_sum/sum_obs)*100

* plot evolution of divided government frequency over time
twoway scatter divided_share year if year>1981 & year <= 2010, xline(1993) ytitle("Divided governments")  xtitle("Year")  ylabel(20 (10) 70) msym(Oh) xlabel(1982(4)2010)
graph export "$data\dividedgovt.pdf", as(pdf) replace
graph export "$data\dividedgovt.eps", as(eps) preview(off) replace
graph save Graph "$data\dividedgovt.gph", replace

clear


*+++++++++++++++++++++++++++++
*TABLE A.1 summary statistics++
*+++++++++++++++++++++++++++++
use "$data\final.dta"

*code population in thousands as population, then take log
gen bev1000 = bevoelkerung*1000
gen log_bev1000 = log(bev1000)

*generate summary statistics for table A.1
summ log_Invzuweis_pc direct_elect electyr bis14jahre_sh ueber65_sh log_Schluess_pc log_bev1000 businesstax proptax

clear

*++++++++++++++++++++++++++++++++++++++++
*TABLE A.2 cohort t-tests in pre-det vars++
*++++++++++++++++++++++++++++++++++++++++
use "$data\final.dta"
* recode municipal personnel expenditures in thousands of euros
replace totpersonexp = totpersonexp/1000

*conduct t-tests for the pre-treatment period (year 1992)
ttesttable bis14jahre_sh first if year == 1992, tex(tableA2_a_15yrs)
ttesttable ueber65_sh first if year == 1992, tex(tableA2_b_65yrs)
ttesttable flaeche first if year == 1992, tex(tableA2_c_area)
ttesttable bevoelkerung first if year == 1992, tex(tableA2_d_pop)  
ttesttable businesstax first if year == 1992, tex(tableA2_e_businesstax)
ttesttable proptax first if year == 1992, tex(tableA2_f_proptax)
ttesttable Schluess_pc first if year == 1992, tex(tableA2_g_rbgrants)
ttesttable schuldenpk first if year == 1992, tex(tableA2_h_debt)
ttesttable tot_beschaef first if year == 1992, tex(tableA2_i_pubempl)
ttesttable totpersonexp first if year == 1992, tex(tableA2_j_personexp)

clear


**Appendix B: Further robustness tests

*************************************
*Table B.1: drop non-positive amounts
*************************************
use "$data\final.dta"

*take log of investment grants without adding 1 beforehand => log of 0 does not exist
replace log_Invzuweis_pc=log(Invzuweis_pc)

xtivreg2 log_Invzuweis_pc direct_elect bmwahl electyr time*, fe r cluster(code)
est store inv1
estadd local time "YES", replace
estadd local countytr "NO", replace
estadd local mayor "YES", replace
estadd local controls "NO", replace

xtivreg2 log_Invzuweis_pc direct_elect bmwahl electyr time* trend_*, fe r cluster(code)
est store inv2
estadd local time "YES", replace
estadd local countytr "YES", replace
estadd local mayor "YES", replace
estadd local controls "NO", replace

xtivreg2 log_Invzuweis_pc direct_elect bmwahl electyr time* trend_* bis14jahre_sh ueber65_sh log_Schluess_pc logpop businesstax proptax, fe r cluster(code)
est store inv3
estadd local time "YES", replace
estadd local countytr "YES", replace
estadd local mayor "YES", replace
estadd local controls "YES", replace

estout inv1 inv2 inv3 using "$data\tableB1.tex", ///
style(tex) keep(direct_elect bmwahl electyr) mlabels("(I)" "(II)" "(III)") order(bmwahl direct_elect electyr)  replace title("Electoral cycles in investment transfers from the state-tier by electoral rules for mayors, only positive transfers considered") ///
 prehead(\begin{table}[htbp] \scriptsize \hspace{\fill} \resizebox{0.65\textwidth}{!}{\begin{threeparttable}\caption{{\sc @title \label{tab:baseline2}}}\centering\medskip ///
 \begin{tabularx}{0.72\textwidth}{P*{@M}{C}} \toprule)  posthead("") prefoot("\midrule") ///
 varlabels(electyr "Election/appointment year" bmwahl "Elected mayor*Election/appointment year" direct_elect "Elected mayor" log_Schluess_pc "Log of rule-based transfers per capita" bis14jahre_sh "Share of population < 15 years" ueber65_sh "Share of population > 65 years" businesstax "Business tax rate multiplier" proptax "Property tax B rate multiplier" logpop "Log of population size")  /// ///
  stats(time mayor countytr controls N N_g r2 , layout(@ @ @ @ @ @ )  fmt(%~#s %~#s %~#s %~#s %6.0f %6.0f %6.3f ) ///
 labels("Year fixed effects" "Municipality fixed effects" "County-specific time trends" "Control variables" "Observations" "Municipalities" "R-squared" )) ///
  starlevels(* 0.10 ** 0.05 *** 0.01) ///
 cells(b(star fmt(%8.3f) ) se(par fmt(%6.3f))     ) ///
 postfoot(\bottomrule\end{tabularx}\begin{tablenotes} \scriptsize{Notes: The dependent variable is the log of investment transfers per capita. Standard errors are robust to heteroscedasticity and clustered at the municipality-level (reported in parentheses). Control variables include share of population over 65 years, share of population below 15 years, log of population size, log of rule-based transfers per capita, and business and property tax rate multipliers. Stars indicate significance levels at 10\% (*), 5\% (**) and 1\%(***).}\end{tablenotes} \end{threeparttable}} \hspace*{\fill}\end{table}) notype

 clear
 
****************************************************
*Table B.2: Lagged dependent variable
****************************************************
use "$data\final.dta"

xtivreg2 log_Invzuweis_pc l.log_Invzuweis_pc direct_elect bmwahl electyr time*, fe r cluster(code)
est store inv1
estadd local time "YES", replace
estadd local countytr "NO", replace
estadd local mayor "YES", replace
estadd local controls "NO", replace

xtivreg2 log_Invzuweis_pc l.log_Invzuweis_pc direct_elect bmwahl electyr time* trend_*, fe r cluster(code)
est store inv2
estadd local time "YES", replace
estadd local countytr "YES", replace
estadd local mayor "YES", replace
estadd local controls "NO", replace

xtivreg2 log_Invzuweis_pc l.log_Invzuweis_pc direct_elect bmwahl electyr time* trend_* bis14jahre_sh ueber65_sh log_Schluess_pc logpop businesstax proptax, fe r cluster(code)
est store inv3
estadd local time "YES", replace
estadd local countytr "YES", replace
estadd local mayor "YES", replace
estadd local controls "YES", replace

estout inv1 inv2 inv3 using "$data\tableB2.tex", ///
rename(appointment councilwahl) ///   
style(tex) keep( L.log_Invzuweis_pc direct_elect bmwahl electyr) mlabels("(I)" "(II)" "(III)") order(bmwahl direct_elect electyr L.log_Invzuweis_pc)  replace title("Electoral cycles in investment transfers from the state-tier by electoral rules for mayors, lagged dependent variable included") ///
 prehead(\begin{table}[htbp] \scriptsize \hspace{\fill} \resizebox{0.65\textwidth}{!}{\begin{threeparttable}\caption{{\sc @title \label{tab:baseline2}}}\centering\medskip ///
 \begin{tabularx}{0.72\textwidth}{P*{@M}{C}} \toprule)  posthead("") prefoot("\midrule") ///
 varlabels(electyr "Election/appointment year" bmwahl "Elected mayor*Election/appointment year" direct_elect "Elected mayor" log_Schluess_pc "Log of rule-based transfers per capita" bis14jahre_sh "Share of population < 15 years" ueber65_sh "Share of population > 65 years" businesstax "Business tax rate multiplier" proptax "Property tax B rate multiplier" logpop "Log of population size" L.log_Invzuweis_pc "Lagged dependent variable")  /// ///
  stats(time mayor countytr controls N N_g r2 , layout(@ @ @ @ @ @ )  fmt(%~#s %~#s %~#s %~#s %6.0f %6.0f %6.3f ) ///
 labels("Year fixed effects" "Municipality fixed effects" "County-specific time trends" "Control variables" "Observations" "Municipalities" "R-squared" )) ///
  starlevels(* 0.10 ** 0.05 *** 0.01) ///
 cells(b(star fmt(%8.3f) ) se(par fmt(%6.3f))     ) ///
 postfoot(\bottomrule\end{tabularx}\begin{tablenotes} \scriptsize{Notes: The dependent variable is the log of investment transfers per capita. Standard errors are robust to heteroscedasticity and clustered at the municipality-level (reported in parentheses). Control variables include share of population over 65 years, share of population below 15 years, log of population size, log of rule-based transfers per capita, and business and property tax rate multipliers. Stars indicate significance levels at 10\% (*), 5\% (**) and 1\%(***).}\end{tablenotes} \end{threeparttable}} \hspace*{\fill}\end{table}) notype
clear
 

*****************************************************************
*Table B3: county-specific time fixed effects
*****************************************************************
use "$data\final.dta"

* generate county-specific time dummies
gen alte_landkreis=landkreis
nsplit code, d(3) g(landkreis)
tab landkreis1, gen(lk)
bysort code (year): gen trend=_n
foreach c of numlist 1(1)29{
	foreach d of numlist 1(1)21{
	gen time_`c'_lk_`d'=time`c'*lk`d'
		}
	}
set matsize 11000

xtivreg2 log_Invzuweis_pc direct_elect bmwahl electyr  time*, fe r cluster(code) 
est store inv1
estadd local time "YES", replace
estadd local countytr "NO", replace
estadd local mayor "YES", replace
estadd local controls "NO", replace

xtivreg2 log_Invzuweis_pc direct_elect bmwahl electyr time_* time* , fe r cluster(code) 
est store inv2
estadd local time "YES", replace
estadd local countytr "YES", replace
estadd local mayor "YES", replace
estadd local controls "NO", replace

xtivreg2 log_Invzuweis_pc direct_elect bmwahl electyr time* time_* bis14jahre_sh ueber65_sh log_Schluess_pc logpop businesstax proptax, fe r cluster(code) 
est store inv3
estadd local time "YES", replace
estadd local countytr "YES", replace
estadd local mayor "YES", replace
estadd local controls "YES", replace

estout inv1 inv2 inv3 using "$data\tableB3.tex", ///
rename(appointment councilwahl) ///
style(tex) keep(direct_elect bmwahl electyr ) mlabels("(I)" "(II)" "(III)") order(bmwahl direct_elect electyr ) replace title("Electoral cycles in investment transfers from the state-tier by electoral rules for mayors, county-specific time dummies") ///
 prehead(\begin{table}[htbp] \scriptsize \hspace{\fill} \resizebox{0.65\textwidth}{!}{\begin{threeparttable}\caption{{\sc @title \label{tab:rob_test_with_county_specific_dummies}}}\centering\medskip ///
 \begin{tabularx}{0.72\textwidth}{P*{@M}{C}} \toprule)  posthead("") prefoot("\midrule") ///
 varlabels(electyr "Election/appointment year" bmwahl "Elected mayor*Election/appointment year" direct_elect "Elected mayor" log_Schluess_pc "Log of rule-based transfers per capita" bis14jahre_sh "Share of population < 15 years" ueber65_sh "Share of population > 65 years" businesstax "Business tax rate multiplier" proptax "Property tax B rate multiplier" logpop "Log of population size")  /// ///
  stats(time mayor countytr controls N N_g r2 , layout(@ @ @ @ @ @ )  fmt(%~#s %~#s %~#s %~#s %6.0f %6.0f %6.3f ) ///
 labels("Year fixed effects" "Municipality fixed effects" "County-specific time dummies" "Control variables" "Observations" "Municipalities" "R-squared" )) ///
  starlevels(* 0.10 ** 0.05 *** 0.01) ///
 cells(b(star fmt(%8.3f) ) se(par fmt(%6.3f))     ) ///
 postfoot(\bottomrule\end{tabularx}\begin{tablenotes} \scriptsize{Notes: The dependent variable is the log of investment transfers per capita. Models (II) nd (III) include county-specific time dummies. Standard errors are robust to heteroscedasticity and clustered at the municipality-level (reported in parentheses). Control variables include share of population over 65 years, share of population below 15 years, log of population size, log of rule-based transfers per capita, and business and property tax rate multipliers. Stars indicate significance levels at 10\% (*), 5\% (**) and 1\%(***).}\end{tablenotes} \end{threeparttable}} \hspace*{\fill}\end{table}) notype

 clear


************************************
*Table B4: other outcome variables
************************************
use "$data\final.dta"

* expenditures
xtivreg2 logtotexp_pc direct_elect  time* trend_* bis14jahre_sh ueber65_sh logpop, fe r cluster(code)
est store totexp_1
estadd local time "YES", replace
estadd local countytr "YES", replace
estadd local mayor "YES", replace
estadd local controls "YES", replace

xtivreg2 logtotexp_pc direct_elect bmwahl electyr time* trend_* bis14jahre_sh ueber65_sh logpop, fe r cluster(code)
est store totexp_2
estadd local time "YES", replace
estadd local countytr "YES", replace
estadd local mayor "YES", replace
estadd local controls "YES", replace

* revenues
xtivreg2 logtotrev_pc direct_elect time* trend_* bis14jahre_sh ueber65_sh logpop, fe r cluster(code)
est store totrev_1
estadd local time "YES", replace
estadd local countytr "YES", replace
estadd local mayor "YES", replace
estadd local controls "YES", replace

xtivreg2 logtotrev_pc direct_elect bmwahl electyr time* trend_* bis14jahre_sh ueber65_sh logpop, fe r cluster(code)
est store totrev_2
estadd local time "YES", replace
estadd local countytr "YES", replace
estadd local mayor "YES", replace
estadd local controls "YES", replace

* business tax
xtivreg2 businesstax direct_elect  time* trend_* bis14jahre_sh ueber65_sh logpop, fe r cluster(code)
est store gewerbesteuerhebe_1
estadd local time "YES", replace
estadd local countytr "YES", replace
estadd local mayor "YES", replace
estadd local controls "YES", replace

xtivreg2 businesstax direct_elect bmwahl electyr time* trend_* bis14jahre_sh ueber65_sh logpop, fe r cluster(code)
est store gewerbesteuerhebe_2
estadd local time "YES", replace
estadd local countytr "YES", replace
estadd local mayor "YES", replace
estadd local controls "YES", replace

* property tax
xtivreg2 proptax direct_elect time* trend_* bis14jahre_sh ueber65_sh logpop, fe r cluster(code)
est store grundsteuerhebe_b_1
estadd local time "YES", replace
estadd local countytr "YES", replace
estadd local mayor "YES", replace
estadd local controls "YES", replace

xtivreg2 proptax direct_elect bmwahl electyr time* trend_* bis14jahre_sh ueber65_sh logpop, fe r cluster(code)
est store grundsteuerhebe_b_2
estadd local time "YES", replace
estadd local countytr "YES", replace
estadd local mayor "YES", replace
estadd local controls "YES", replace

* rule-based grants
xtivreg2 log_Schluess_pc direct_elect  time* trend_* bis14jahre_sh ueber65_sh logpop, fe r cluster(code)
est store schluesselzu_1
estadd local time "YES", replace
estadd local countytr "YES", replace
estadd local mayor "YES", replace
estadd local controls "YES", replace

xtivreg2 log_Schluess_pc direct_elect bmwahl electyr time* trend_* bis14jahre_sh ueber65_sh logpop, fe r cluster(code)
est store schluesselzu_2
estadd local time "YES", replace
estadd local countytr "YES", replace
estadd local mayor "YES", replace
estadd local controls "YES", replace

* baseline outcomes
estout totexp_1 totrev_1 gewerbesteuerhebe_1 grundsteuerhebe_b_1 schluesselzu_1 using "$data\tableB4_baseline.tex", ///   
style(tex) keep(direct_elect) mlabels("(Expenditures)" "(Revenues)" "(Business tax)" "(Property tax)" "(Rule-based transfers)") order(direct_elect)  replace title("Effect of the electoral rule for the mayor on investment transfers from the state-tier") ///
 prehead(\begin{table}[htbp] \scriptsize \hspace{\fill} \resizebox{0.57\textwidth}{!}{\begin{threeparttable}\caption{{\sc @title \label{tab:other_outcomes}}}\centering\medskip ///
 \begin{tabularx}{0.6\textwidth}{P*{@M}{C}} \toprule)  posthead("" ) prefoot("\midrule") ///
 varlabels(direct_elect "Elected mayor" bis14jahre_sh "Share of population < 15 years" ueber65_sh "Share of population > 65 years" businesstax "Business tax rate multiplier" log_Schluess_pc "Log of rule-based transfers per capita" grundsteuerhebe_b "Property tax B rate multiplier" logpop "Log of population size")  /// 
 stats(time mayor countytr controls N N_g r2 , layout(@ @ @ @ @ @ )  fmt(%~#s %~#s %~#s %~#s %6.0f %6.0f %6.3f ) ///
 labels("Year fixed effects" "Municipality fixed effects" "County-specific time trends" "Control variables" "Observations" "Municipalities" "R-squared" )) /// 
  starlevels(* 0.10 ** 0.05 *** 0.01) ///
 cells(b(star fmt(%8.3f) ) se(par fmt(%6.3f))     ) ///
 postfoot(\bottomrule\end{tabularx}\end{threeparttable}} \hspace*{\fill}\end{table}) notype

* with cycle
estout totexp_2  totrev_2 gewerbesteuerhebe_2 grundsteuerhebe_b_2 schluesselzu_2 using "$data\tableB4_cycle.tex", ///
rename(appointment councilwahl) ///
style(tex) keep(direct_elect bmwahl electyr ) mlabels("(Expenditures)" "(Revenues)" "(Business tax)" "(Property tax)" "(Rule-based transfers)") order(bmwahl direct_elect electyr ) replace title("Electoral cycles in investment transfers from the state-tier by electoral rules for mayors") ///
 prehead(\begin{table}[htbp] \scriptsize \hspace{\fill} \resizebox{0.65\textwidth}{!}{\begin{threeparttable}\caption{{\sc @title \label{tab:baseline2}}}\centering\medskip ///
 \begin{tabularx}{0.72\textwidth}{P*{@M}{C}} \toprule)  posthead("") prefoot("\midrule") ///
 varlabels(electyr "Election/appointment year" bmwahl "Elected mayor*Election/appointment year" direct_elect "Elected mayor" log_Schluess_pc "Log of rule-based transfers per capita" bis14jahre_sh "Share of population < 15 years" ueber65_sh "Share of population > 65 years" businesstax "Business tax rate multiplier" proptax "Property tax B rate multiplier" logpop "Log of population size")  /// ///
  stats(time mayor countytr controls N N_g r2 , layout(@ @ @ @ @ @ )  fmt(%~#s %~#s %~#s %~#s %6.0f %6.0f %6.3f ) ///
 labels("Year fixed effects" "Municipality fixed effects" "County-specific time trends" "Control variables" "Observations" "Municipalities" "R-squared" )) ///
  starlevels(* 0.10 ** 0.05 *** 0.01) ///
 cells(b(star fmt(%8.3f) ) se(par fmt(%6.3f))     ) ///
 postfoot(\bottomrule\end{tabularx}\begin{tablenotes} \scriptsize{Notes: The dependent variables are the log of expenditures per capita (Column I), the log of revenues per capita (Column II), the business tax rate (Column III), the property tax rate (Column IV), and the log of rule-based transfers per capita (Column V). Standard errors are robust to heteroscedasticity and clustered at the municipality-level (reported in parentheses). Control variables include share of population over 65 years, share of population below 15 years and log of population size. Stars indicate significance levels at 10\% (*), 5\% (**) and 1\%(***).}\end{tablenotes} \end{threeparttable}} \hspace*{\fill}\end{table}) notype

exit
